{% extends "./layout.html" %}

{% block title %}{{ page.title }} · {{ super() }}{% endblock %}

{% block description %}{{ page.description }}{% endblock %}

{% block head %}
    {{ super() }}
    {% if page.next and page.next.path %}
    <link rel="next" href="{{ page.next.path|resolveFile }}" />
    {% endif %}
    {% if page.previous and page.previous.path %}
    <link rel="prev" href="{{ page.previous.path|resolveFile }}" />
    {% endif %}
    <link rel="stylesheet" href="http://alibaba.github.io/weex/css/site.css">
    <!-- 
    <link rel="stylesheet" href="http://127.0.0.1/taobao/weex/docs/ali_addition/weex_doc.css">
    -->    
    <link rel="stylesheet"  href="http://alibaba.github.io/weex/css/weex_doc.css" >    
    <link rel="icon" type="image/x-icon" href="http://alibaba.github.io/weex/img/favicon.ico">    
    
{% endblock %}

{% block javascript %}
    <script src="{{ "app.js"|resolveAsset }}"></script>
    {% for resource in plugins.resources.js %}
        {% if resource.url %}
        <script src="{{ resource.url }}"></script>
        {% else %}
        <script src="{{ resource.path|resolveAsset }}"></script>
        {% endif %}
    {% endfor %}
    <script>
    require(["gitbook"], function(gitbook) {
        gitbook.start({{ config.pluginsConfig|dump|safe }});
    });
    </script>
    
    
{% endblock %}

{% block body %}
<div class="book"
    data-level="{{ page.level }}"
    data-chapter-title="{{ page.title }}"
    data-filepath="{{ file.path }}"
    data-basepath="{{ './'|resolveFile }}"
    data-revision="{{ gitbook.time }}"
    data-innerlanguage="{{ innerlanguage }}">

    <div class="weex-doc-header">
        <div class="top-bar">
                <div class="top-bar-title"></div>
                <div class="top-bar-left">
                    <ul  class="menu" role="menubar" >
                        <li role="menuitem">
                            <a href='http://alibaba.github.io/weex/index.html'>Weex</a>                            
                        </li>
                        <li role="menuitem">
                            Docs
                        </li>
                        <li role="menuitem">
                            <a href='http://alibaba.github.io/weex/demo.html'>Demo</a>                            
                        </li>
                        <li role="menuitem">
                        </li>
                        <li role="menuitem" >
                            <a href="http://alibaba.github.io/weex/community.html">Community</a>
                        </li>
                    </ul>
                </div>
                <div class="top-bar-right">
                    <ul class="menu">
                        <li><a href="https://github.com/alibaba/weex/">Github</a>
                        </li>
                    </ul>
                </div>
        </div>        
    </div>
    
    {% include "website/summary.html" %}

    <div class="book-body">

        {% block book_body %}
            <div class="body-inner">
                {% block book_inner %}
                    {% include "website/header.html" %}

                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            <section class="normal markdown-section">
                            {% block page %}
                            {{ page.content|safe }}
                            {% endblock %}
                            </section>
                        </div>
                    </div>
                {% endblock %}
            </div>

            {% block book_navigation %}
                {% if page.previous and page.previous.path %}
                <a href="{{ page.previous.path|resolveFile }}" class="navigation navigation-prev {% if not (page.next and page.next.path) %}navigation-unique{% endif %}" aria-label="Previous page: {{ page.previous.title }}">
                    <i class="fa fa-angle-left"></i>
                </a>
                {% endif %}
                {% if page.next and page.next.path %}
                <a href="{{ page.next.path|resolveFile }}" class="navigation navigation-next {% if not (page.previous and page.previous.path) %}navigation-unique{% endif %}" aria-label="Next page: {{ page.next.title }}">
                    <i class="fa fa-angle-right"></i>
                </a>
                {% endif %}
            {% endblock %}
        {% endblock %}
    </div>
</div>
{% endblock %}
